package com.lxq.www.service;

import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

import javax.jms.Queue;

@Component
public class MQFactory {
    public Queue getLiveQueue(){
        return new ActiveMQQueue("lxqLiveNoticeQueue");
    }

    @JmsListener(destination = "finalControl")
    public void getMsgFromLive(String msg){
        System.out.println("收到回复："+msg);
    }
}
